package com.prs.crm.domain.oa;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.doc.Document;
import com.prs.crm.domain.hr.Person;

@Entity
@Table(name="oa_task_submit")
public class OaTaskSubmit extends BaseEntity{
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	@ManyToOne
	private OaTask task;
	private String attach;
	@Lob
	private String content;
	private String state;
	@ManyToOne
	private Person exePerson;
	@OneToMany(fetch=FetchType.LAZY,mappedBy="oaTaskSubmit")
	private Set<Document> docs;
	
	@OneToMany(fetch=FetchType.LAZY,mappedBy="oaTaskSubmit")
	private Set<OaTaskAudit> audits;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public OaTask getTask() {
		return task;
	}
	public void setTask(OaTask task) {
		this.task = task;
	}
	public String getAttach() {
		return attach;
	}
	public void setAttach(String attach) {
		this.attach = attach;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getState() {
		return state;
	}
	public void setExePerson(Person exePerson) {
		this.exePerson = exePerson;
	}
	public Person getExePerson() {
		return exePerson;
	}
	public void setAudits(Set<OaTaskAudit> audits) {
		this.audits = audits;
	}
	public Set<OaTaskAudit> getAudits() {
		return audits;
	}
	public void setDocs(Set<Document> docs) {
		this.docs = docs;
	}
	public Set<Document> getDocs() {
		return docs;
	}	
}
